<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
  <title>系统安全验证</title> 
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
  <meta name="viewport" id="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> 
  <meta name="format-detection" content="telephone=no"> 
  <meta name="apple-mobile-web-app-capable" content="yes"> 
  <meta name="apple-mobile-web-app-status-bar-style" content="white"> 
  <meta name="wap-font-scale" content="no"> 
 </head> 
 <body> 
  <style>.td_left{width:100px;text-align:right;height:45px}.td_right{padding-left:40px}#birthday,#checkcode,#email,#name,#password,#phone,#username{width:100px;height:32px;border:1px solid gray;border-radius:5px;padding-left:6px}#checkcode{width:86px}#img_check{height:32px;vertical-align:middle}#btn_sub{width:70px;height:38px;background-color:#ffd026;border:1px solid #ffd026;border-radius:6px;margin-top:20px}</style> 
  <script>var SitePath='/',SiteAid='',SiteTid='{maccms:sitetid}',SiteId='{maccms:siteid}';</script> 
  <script src="/js/jquery.js"></script> 
  <script src="/js/jq/jquery.lazyload.js"></script> 
  <script src="/js/jq/jquery.autocomplete.js"></script> 
  <script src="/template/blank/js/home.js"></script> 
  <script>
    function verify_reload()
    {
        $(".mac_verify_img").attr("src",SitePath+'inc/common/code.php?a=list&s='+Math.random());
        $('.mac_verify').focus();
    }
    $(function(){
        verify_reload();

        $("input[name='verify']").bind('keypress',function(event){
            if(event.keyCode == "13") {
                if($("input[name='verify']").val()!=''){
                    $('.verify_submit').click();
                }
            }
        });
        $(".mac_verify_img").click(function(){
            verify_reload();
        });
        $('.verify_submit').click(function(){
            var v = $('input[name="verify"]').val();

            $.ajax({
                type: 'get',
                dataType:'json',
                url: SitePath+'inc/ajax.php?ac=code_check&type=list&code='+$("input[name='verify']").val(),
                success:function(r){
                    console.log(r);
                    if(r.code==1){
                        location.reload();
                    }
                    else{
                        alert(r.msg);
                        verify_reload();
                    }
                },
                error:function( r){
                    alert('请求失败，请重试');
                    verify_reload();
                }
            });
        });
    });
</script> 
  <div align="center">
   <br>
   <br>
   <br>
   <br>
   <br>
   <br>
   <br>
   <table>
    <tbody>
     <tr>
      <td class="td_right"><input type="text" name="verify" class="mac_verify" id="checkcode" placeholder="请输入验证码" style="vertical-align:middle">&nbsp; <img id="img_check" class="mac_verify_img" src="" title="看不清楚?换一张！" style="vertical-align:middle"> &nbsp; &nbsp;<input type="button" class="verify_submit submit_btn" id="btn_sub" value="提交验证"></td>
     </tr>
    </tbody>
   </table>
  </div>  
 </body>
</html>